<template>
  <h2>Child组件</h2>
</template>

<script lang="ts">
import {defineComponent,ref,reactive, onBeforeMount,onMounted,onBeforeUpdate,onUpdated,onBeforeUnmount,onUnmounted} from "vue"
export default defineComponent ({
    setup(){
        onBeforeMount(()=>{
            console.log("3.0 onBeforeMount");
        });
        onMounted(()=>{
            console.log("3.0 onMounted");
        })
        onBeforeUpdate(()=>{
            console.log("3.0 onBeforeUpdate");
        })
        onUpdated(()=>{
            console.log("3.0 onUpdated");
        })
        onBeforeUnmount(()=>{
            console.log("3.0 onBeforeUnmount");
        })
        onUnmounted(()=>{
            console.log("3.0 onUnmounted");
        })
        console.log("setup");
        
        const meg = ref("abc")
        return{
            meg
        }
    },
    beforeCreate(){
        console.log("2.0 beforeCreate")
    },
    created(){
        console.log("2.0 created");
    },
    beforeMount(){
        console.log("2.0 beforeMount");
    },
    mounted(){
        console.log("2.0 mounted");
    },
    beforeUpdate(){
        console.log("2.0 beforeUpdate");
    },
    updated(){
        console.log("2.0 updated");
    },
    beforeUnmount(){
        console.log("2.0 beforeDestroy");
    },
    unmounted(){
        console.log("2.0 destroyed");
    },
    activated(){
        console.log('activated');
        
    }
})
</script>

<style scoped>

</style>
